package com.kelaite.procurement.service;

import java.util.List;

import com.kelaite.procurement.dto.UserDTO;
import com.kelaite.procurement.entity.TCompany;
import com.kelaite.procurement.entity.TUser;

public interface UserService {
	public TUser save(TUser persistence);

	public void deleteByPrimaryKey(Long id);
	
	public void deleteByObject(TUser persistence);

	public TUser getObject(Long id);
	
	public List<TUser> getAll();

	public List<TUser> getByProperty(String property, Object value);
	
	public List<TUser> getUsersByCompany(TCompany company, TUser user);
	
	public UserDTO login(UserDTO user);	
	
	public Long  countByTCompany(TCompany tCompany);	

	public TUser findByUsername(String username);
	
	public TUser findByTCompanyAndIsCompanyAdmin(TCompany company, Integer isCompanyAdmin);
	
	public boolean updateChangeUser(String realName,String mobilePhone,
			Long companyId,String roleIds,Long id);
}
